class CreateBatches < ActiveRecord::Migration
  def self.up
    create_table :batches do |t|
      t.string :code, :unique=>true
      t.integer :parent_batch_id
      t.string :name
      t.string :description
      t.date  :start_date
      t.date  :end_date
      t.boolean :is_deleted, :default => false
      t.timestamps
    end
  end

  def self.down
    drop_table :batches
  end
end
